package com.api.test.app;

import com.api.test.R;
import com.api.test.view.Controls1;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Animation extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_animation);
		
		Button button = (Button) findViewById(R.id.fade_animation);
		button.setOnClickListener(mFadeListener);
		button = (Button) findViewById(R.id.zoom_animation);
		button.setOnClickListener(mZoomListener);
	}
	
	private OnClickListener mFadeListener = new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			startActivity(new Intent(Animation.this, Controls1.class));
			overridePendingTransition(R.anim.fade, R.anim.hold);
		}
	};
	
	private OnClickListener mZoomListener = new OnClickListener() {
		@Override
		public void onClick(View v) {
			startActivity(new Intent(Animation.this, Controls1.class));
			overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
		}
	};

}
